<html>
<head>
<title>直方图</title>
</head>
<script src="echarts.js"></script>
<script src="ecStat.js"></script>   
<body>
    <div id="main" style="width:400px;height:300px;"></div>
	<!-- <div style="position:fixed;left:333;top:224px;font-size:12px;">日志量/GB</div> -->
	<div style="position:fixed;left:373;top:240px;font-size:14px;background:white;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<script>
        var myChart = echarts.init(document.getElementById('main'));

var option = {
   title: {
        text: '直方图'
    },
    tooltip: {
         trigger: 'axis'
    },
    xAxis: {
        type: 'value',
        name: '日志量/GB',
        // 行数据间距
		interval:5,
    },
    yAxis: {
        type: 'value',
        name: '耗时量/秒'
    },
	legend:{
        data:['单击耗时','集群耗时量']
        },
    dataset:{
        // dimensions: ['product', '单击耗时', '集群耗时量'],
     source:[
             ['produtct','单击耗时','集群耗时量'],
             ['2','20','24'],
             ['6','40','72'],
             ['10','50','120'],
             ['14','60','170'],
             ['20','70','240'],
             ['25','110','300'],
             ['30','120','360'],
             ['38','130','440'],
     ] ,          
        },
    series: [
        {
		name:'单击耗时',
        type: 'line',
        encode:{
            x:'produtct',
            y:'单击耗时',
        },
    },
    {
		name:'集群耗时量',
        type: 'line',
        encode:{
            x:'produtct',
            y:'集群耗时量'
        }
    }
]
};

 myChart.setOption(option);

</script>

</body>

</html>